using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Package
{
    /// <summary>
    /// <para>Create Mobile Map Package</para>
    /// <para>Packages maps and basemaps along with all referenced data sources into a single .mmpk file.</para>
    /// <para>将地图和底图以及所有引用的数据源打包到单个 .mmpk 文件中。</para>
    /// </summary>    
    [DisplayName("Create Mobile Map Package")]
    public class CreateMobileMapPackage : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateMobileMapPackage()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_map">
        /// <para>Input Map</para>
        /// <para>One or more maps or basemaps that will be packaged into a single .mmpk file.</para>
        /// <para>一个或多个地图或底图，这些地图或底图将打包到单个 .mmpk 文件中。</para>
        /// </param>
        /// <param name="_output_file">
        /// <para>Output File</para>
        /// <para>The output mobile map package (.mmpk).</para>
        /// <para>输出移动地图包 （.mmpk）。</para>
        /// </param>
        public CreateMobileMapPackage(List<object> _in_map, object _output_file)
        {
            this._in_map = _in_map;
            this._output_file = _output_file;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Create Mobile Map Package";

        public override string CallName => "management.CreateMobileMapPackage";

        public override List<string> AcceptEnvironments => ["extent", "workspace"];

        public override object[] ParameterInfo => [_in_map, _output_file, _in_locator, _area_of_interest, _extent, _clip_features.GetGPValue(), _title, _summary, _description, _tags, _credits, _use_limitations, _anonymous_use.GetGPValue(), _enable_map_expiration.GetGPValue(), _map_expiration_type.GetGPValue(), _expiration_date, _expiration_message, _select_related_rows.GetGPValue(), _reference_online_content.GetGPValue()];

        /// <summary>
        /// <para>Input Map</para>
        /// <para>One or more maps or basemaps that will be packaged into a single .mmpk file.</para>
        /// <para>一个或多个地图或底图，这些地图或底图将打包到单个 .mmpk 文件中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Map")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_map { get; set; }


        /// <summary>
        /// <para>Output File</para>
        /// <para>The output mobile map package (.mmpk).</para>
        /// <para>输出移动地图包 （.mmpk）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_file { get; set; }


        /// <summary>
        /// <para>Input Locator</para>
        /// <para>Locators have the following restrictions:</para>
        /// <para>定位器具有以下限制：</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Locator")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _in_locator { get; set; } = null;


        /// <summary>
        /// <para>Area of Interest</para>
        /// <para>Polygon layer that defines the area of interest. Only those features that intersect the Area of Interest will be included in the mobile map package.</para>
        /// <para>定义感兴趣区域的面图层。只有与感兴趣区域相交的要素才会包含在移动地图包中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Area of Interest")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _area_of_interest { get; set; } = null;


        /// <summary>
        /// <para>Extent</para>
        /// <para><xdoc>
        ///   <para>Specifies the extent that will be used to select or clip features.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—The extent will be based on the maximum extent of all participating inputs. This is the default.</bullet_item><para/>
        ///     <bullet_item>Union of Inputs—The extent will be based on the maximum extent of all inputs.</bullet_item><para/>
        ///     <bullet_item>Intersection of Inputs—The extent will be based on the minimum area common to all inputs.</bullet_item><para/>
        ///     <bullet_item>Current Display Extent—The extent is equal to the visible display. The option is not available when there is no active map.</bullet_item><para/>
        ///     <bullet_item>As Specified Below—The extent will be based on the minimum and maximum extent values specified.</bullet_item><para/>
        ///     <bullet_item>Browse—The extent will be based on an existing dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于选择或裁剪要素的范围。</para>
        ///   <bulletList>
        ///     <bullet_item>默认值 - 范围将基于所有参与输入的最大范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>输入并集 - 范围将基于所有输入的最大范围。</bullet_item><para/>
        ///     <bullet_item>输入交点 - 范围将基于所有输入共有的最小面积。</bullet_item><para/>
        ///     <bullet_item>当前显示范围 - 范围等于可见显示。当没有活动地图时，该选项不可用。</bullet_item><para/>
        ///     <bullet_item>如下所述 - 范围将基于指定的最小和最大范围值。</bullet_item><para/>
        ///     <bullet_item>浏览 - 范围将基于现有数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _extent { get; set; } = null;


        /// <summary>
        /// <para>Clip Features</para>
        /// <para><xdoc>
        ///   <para>Determines if the output features will be clipped to the given Area of Interest or Extent.
        ///   <bulletList>
        ///     <bullet_item>Checked—The geometry of the features will be clipped to the given Area of Interest or Extent.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Features in the map will be selected and their geometry will remain unaltered. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>确定是否将输出要素裁剪到给定的感兴趣区域或范围。
        ///   <bulletList>
        ///     <bullet_item>选中 - 要素的几何将被裁剪到给定的感兴趣区域或范围。</bullet_item><para/>
        ///     <bullet_item>未选中 - 地图中的要素将被选中，其几何将保持不变。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Clip Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _clip_features_value _clip_features { get; set; } = _clip_features_value._false;

        public enum _clip_features_value
        {
            /// <summary>
            /// <para>CLIP</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CLIP")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>SELECT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SELECT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Title</para>
        /// <para>Adds title information to the properties of the package.</para>
        /// <para>将标题信息添加到包的属性中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Title")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _title { get; set; } = null;


        /// <summary>
        /// <para>Summary</para>
        /// <para>Adds summary information to the properties of the package.</para>
        /// <para>将摘要信息添加到包的属性中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Summary")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _summary { get; set; } = null;


        /// <summary>
        /// <para>Description</para>
        /// <para>Adds description information to the properties of the package.</para>
        /// <para>将说明信息添加到包的属性中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Description")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _description { get; set; } = null;


        /// <summary>
        /// <para>Tags</para>
        /// <para>Adds tag information to the properties of the package. Multiple tags can be added or separated by a comma or semicolon.</para>
        /// <para>将标记信息添加到包的属性中。可以添加多个标签，也可以用逗号或分号分隔。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tags")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _tags { get; set; } = null;


        /// <summary>
        /// <para>Credits</para>
        /// <para>Adds credit information to the properties of the package.</para>
        /// <para>将信用信息添加到包的属性中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Credits")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _credits { get; set; } = null;


        /// <summary>
        /// <para>Use Limitations</para>
        /// <para>Adds use limitations to the properties of the package.</para>
        /// <para>向包的属性添加使用限制。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Use Limitations")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _use_limitations { get; set; } = null;


        /// <summary>
        /// <para>Enable Anonymous Use</para>
        /// <para><xdoc>
        ///   <para>Determines if the mobile map can be used by anyone.
        ///   <bulletList>
        ///     <bullet_item>Checked—Enables anyone with access to the package to use the mobile map without signing in with an Esri Named User account.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Anyone with access to the package must be signed in with a Named User account to use the mobile map. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>This optional parameter is only available with the Publisher extension.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>确定移动地图是否可供任何人使用。
        ///   <bulletList>
        ///     <bullet_item>选中 - 允许有权访问包的任何人使用移动地图，而无需使用 Esri 指定用户帐户登录。</bullet_item><para/>
        ///     <bullet_item>未选中 - 有权访问包的任何人都必须使用指定用户帐户登录才能使用移动地图。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>此可选参数仅适用于 Publisher 扩展。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Enable Anonymous Use")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _anonymous_use_value _anonymous_use { get; set; } = _anonymous_use_value._false;

        public enum _anonymous_use_value
        {
            /// <summary>
            /// <para>ANONYMOUS_USE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ANONYMOUS_USE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>STANDARD</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("STANDARD")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Enable Map Expiration</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the mobile map package will time out.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Time-out is enabled on the mobile map package.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Time-out is disabled on the mobile map package. This is the default.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>This optional parameter is only available with the Publisher extension.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定移动地图包是否超时。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 在移动地图包上启用超时。</bullet_item><para/>
        ///     <bullet_item>未选中 - 在移动地图包上禁用超时。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>此可选参数仅适用于 Publisher 扩展。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Enable Map Expiration")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _enable_map_expiration_value _enable_map_expiration { get; set; } = _enable_map_expiration_value._false;

        public enum _enable_map_expiration_value
        {
            /// <summary>
            /// <para>ENABLE_MAP_EXPIRATION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ENABLE_MAP_EXPIRATION")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DISABLE_MAP_EXPIRATION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DISABLE_MAP_EXPIRATION")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Map Expiration Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of access for the expired mobile map package.</para>
        ///   <bulletList>
        ///     <bullet_item>Allow to open—Warns the user of the package that the map has expired, but allow to open. This is the default.</bullet_item><para/>
        ///     <bullet_item>Do not allow to open—Warns the user of the package that the map has expired, and do not allow to open.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>This optional parameter is only available with the Publisher extension.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定过期移动地图包的访问类型。</para>
        ///   <bulletList>
        ///     <bullet_item>允许打开 - 警告包的用户地图已过期，但允许打开。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>不允许打开 - 警告包的用户地图已过期，并且不允许打开。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>此可选参数仅适用于 Publisher 扩展。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Map Expiration Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _map_expiration_type_value _map_expiration_type { get; set; } = _map_expiration_type_value._ALLOW_TO_OPEN;

        public enum _map_expiration_type_value
        {
            /// <summary>
            /// <para>Allow to open</para>
            /// <para>Allow to open—Warns the user of the package that the map has expired, but allow to open. This is the default.</para>
            /// <para>允许打开 - 警告包的用户地图已过期，但允许打开。这是默认设置。</para>
            /// </summary>
            [Description("Allow to open")]
            [GPEnumValue("ALLOW_TO_OPEN")]
            _ALLOW_TO_OPEN,

            /// <summary>
            /// <para>Do not allow to open</para>
            /// <para>Do not allow to open—Warns the user of the package that the map has expired, and do not allow to open.</para>
            /// <para>不允许打开 - 警告包的用户地图已过期，并且不允许打开。</para>
            /// </summary>
            [Description("Do not allow to open")]
            [GPEnumValue("DONOT_ALLOW_TO_OPEN")]
            _DONOT_ALLOW_TO_OPEN,

        }

        /// <summary>
        /// <para>Expiration Date</para>
        /// <para><xdoc>
        ///   <para>Specifies the date for the mobile map package to expire.</para>
        ///   <para>This optional parameter is only available with the Publisher extension.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定移动地图包的到期日期。</para>
        ///   <para>此可选参数仅适用于 Publisher 扩展。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expiration Date")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _expiration_date { get; set; } = null;


        /// <summary>
        /// <para>Expiration Message</para>
        /// <para><xdoc>
        ///   <para>A text message to display when an expired map is accessed.</para>
        ///   <para>This optional parameter is only available with the Publisher extension.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>访问过期地图时显示的文本消息。</para>
        ///   <para>此可选参数仅适用于 Publisher 扩展。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expiration Message")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _expiration_message { get; set; } = null;


        /// <summary>
        /// <para>Keep only the rows which are related to features within the extent</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the specified extent will be applied to related data sources.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Related data sources will be consolidated in their entirety. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Only related data corresponding to records within the specified extent will be consolidated.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将指定的范围应用于相关数据源。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 相关数据源将全部合并。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 仅合并与指定范围内的记录对应的相关数据。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Keep only the rows which are related to features within the extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _select_related_rows_value _select_related_rows { get; set; } = _select_related_rows_value._false;

        public enum _select_related_rows_value
        {
            /// <summary>
            /// <para>KEEP_ONLY_RELATED_ROWS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("KEEP_ONLY_RELATED_ROWS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>KEEP_ALL_RELATED_ROWS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("KEEP_ALL_RELATED_ROWS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Reference Online Content</para>
        /// <para><xdoc>
        ///   <para>Specifies whether service layers will be referenced in the package.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Service layers will not be referenced in the mobile package. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Checked—Service layers will be referenced in the mobile package.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否在包中引用服务图层。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不会在移动包中引用服务图层。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>选中 - 将在移动包中引用服务图层。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reference Online Content")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _reference_online_content_value _reference_online_content { get; set; } = _reference_online_content_value._false;

        public enum _reference_online_content_value
        {
            /// <summary>
            /// <para>INCLUDE_SERVICE_LAYERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INCLUDE_SERVICE_LAYERS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>EXCLUDE_SERVICE_LAYERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("EXCLUDE_SERVICE_LAYERS")]
            [GPEnumValue("false")]
            _false,

        }

        public CreateMobileMapPackage SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}